package cn.iocoder.yudao.module.wecom.mq.producer;

import cn.iocoder.yudao.module.wecom.mq.message.SyncCustomerMessage;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class SyncCustomerProducer {

    @Resource
    private ApplicationContext applicationContext;

    public void sendMessage(Long tenantId) {
        SyncCustomerMessage message = new SyncCustomerMessage();
        message.setTenantId(tenantId);
        applicationContext.publishEvent(message);
    }
}
